﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Content.Master" Inherits="System.Web.Mvc.ViewPage<MethodWorx.CMS.UI.Models.DeleteTemplateModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Delete <%=this.Model.Type %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div class="formItem">
    <table>
        <tr>
            <td><img src="<%=Url.Content("~/Images/icons/cross.png")%>" /></td>
            <td><em>Do you want to delete the <%=this.Model.Type.ToLower() %>, or the relationship between the page template and the <%=this.Model.Type.ToLower() %>?</em></td>
        </tr>
    </table>
    </div>
    <div class="formItem">
        <strong><%=this.Model.Type %> is also related to:</strong>
        <div style="width:100%;height:150px;background-color:White;border:1px solid silver;overflow:auto">
            <%if(this.Model.RelatedTo.Count() == 0) { %>
                <div  style="padding:2px">
                    <em>No other relationships</em>
                </div>
            <%} else {%>
                <%foreach(var pt in this.Model.RelatedTo) {%>
                <div style="padding:2px"><%=pt.Name %></div>
                <%} %>
            <%} %>
        </div>
    </div>
    <div class="formItem">
        <table>
            <tr>
                <td><img src="/Images/icons/information.png" /></td>
                <td><em>Any existing items based on this template will remain until deleted.</em></td>
            </tr>
        </table>
    </div>
    <%using(Html.BeginForm()) { %>
    <div class="formItem">
        <button name="submit" value="deleteTemplate">Delete Template</button>
        <button name="submit" value="deleteRelationship">Delete Relationship to '<%= this.Model.PageTemplate.Name %>'</button>
        <button name="submit" value="cancel">Cancel</button>
    </div>
    <%} %>
    </form>

</asp:Content>
